/*
 * 
 * 
 * 
 */
package com.hboxs.asl.entity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * Entity - 全局设定
 */
@Entity
@Table(name = "xx_global_config")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "xx_global_config_sequence")
public class GlobalConfig extends OrderEntity {

    private static final long serialVersionUID = -6109590111136943215L;

    /**
     * 我的上级分销比例
     */
    private BigDecimal firstParent;

    /**
     * 我的上上级分销比例
     */
    private BigDecimal secondParent;

    /**
     * 积分比例
     */
    private BigDecimal pointProportion;

    /**
     * 主播分销比例
     */
    private BigDecimal anchorLevel;

    /**
     * 注册标签
     */
    private List<String> registerTag;

    /**
     * 控制直播
     */
    private Boolean onOff;

    /**
     * 是否显示支付
     */
    private Boolean payShow;

    /**
     * 注册默认积分
     */
    private BigDecimal point;

    /**
     * 积分余额转换比例
     */
    private BigDecimal percentage;

    /**
     * 直播公告
     */
    private String notice;

    private List<IOSConfig> iosConfigs = new ArrayList<>();

    public BigDecimal getFirstParent() {
        return firstParent;
    }

    public void setFirstParent(BigDecimal firstParent) {
        this.firstParent = firstParent;
    }

    public BigDecimal getSecondParent() {
        return secondParent;
    }

    public void setSecondParent(BigDecimal secondParent) {
        this.secondParent = secondParent;
    }

    public BigDecimal getAnchorLevel() {
        return anchorLevel;
    }

    public void setAnchorLevel(BigDecimal anchorLevel) {
        this.anchorLevel = anchorLevel;
    }

    public BigDecimal getPointProportion() {
        return pointProportion;
    }

    public void setPointProportion(BigDecimal pointProportion) {
        this.pointProportion = pointProportion;
    }

    @ElementCollection
    @CollectionTable(name = "xx_global_config_register_tag")
    public List<String> getRegisterTag() {
        return registerTag;
    }

    public void setRegisterTag(List<String> registerTag) {
        this.registerTag = registerTag;
    }

    public Boolean getOnOff() {
        return onOff;
    }

    public void setOnOff(Boolean onOff) {
        this.onOff = onOff;
    }

    public BigDecimal getPoint() {
        return point;
    }

    public void setPoint(BigDecimal point) {
        this.point = point;
    }

    public BigDecimal getPercentage() {
        return percentage;
    }

    public void setPercentage(BigDecimal percentage) {
        this.percentage = percentage;
    }

    public String getNotice() {
        return notice;
    }

    public void setNotice(String notice) {
        this.notice = notice;
    }

    public Boolean getPayShow() {
        return payShow;
    }

    public void setPayShow(Boolean payShow) {
        this.payShow = payShow;
    }

    @OneToMany(mappedBy = "globalConfig", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
    public List<IOSConfig> getIosConfigs() {
        return iosConfigs;
    }

    public void setIosConfigs(List<IOSConfig> iosConfigs) {
        this.iosConfigs = iosConfigs;
    }
}